.app-container {
  font-family: 'SimHei', sans-serif;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px;
}

.app-header {
  text-align: center;
  margin-bottom: 20px;
}

.top-bar {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 20px;
}

.url-input-group {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
}

.url-input-group label {
  margin-right: 10px;
  font-weight: bold;
}

.url-input {
  flex-grow: 1;
  padding: 5px;
  font-size: 14px;
}

.info-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 5px 0;
}

.issue-info {
  font-weight: bold;
  font-size: 16px;
}

.button-group {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.apply-btn {
  background-color: #673ab7;
}

.refresh-btn {
  background-color: #9C27B0;
}

.generate-btn {
  background-color: #4CAF50;
}

.export-img-btn {
  background-color: #FF9800;
}

.clear-btn {
  background-color: #f44336;
}

.content-container {
  display: flex;
  gap: 20px;
  /* 移除固定高度限制，允许内容自然扩展 */
  min-height: 500px;
  max-height: calc(100vh - 220px); /* 保留最大高度但增加一些空间 */
  overflow: hidden; /* 防止整体容器滚动 */
}

.matches-container, .combinations-container {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 确保子元素控制滚动 */
}

.matches-container h2, .combinations-container h2 {
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.table-header, .match-row {
  display: flex;
  width: 100%;
}

.table-cell {
  flex: 1;
  padding: 8px;
  text-align: center;
  border: 1px solid #eee;
}

.table-header .table-cell {
  background-color: #34495e;
  color: white;
  font-weight: bold;
}

.match-row:nth-child(even) {
  background-color: #f0f7ff;
}

.selection-group {
  display: flex;
  width: 100%;
}

.selection-cell {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  border-radius: 2px;
  margin: 0 2px;
}

.win {
  background-color: #ffebee;
  color: #c62828;
}

.draw {
  background-color: #FFF5E2; /* 参考提供的样式 */
  color: #EC6841; /* 参考提供的样式 */
}

.lose {
  background-color: #e8f5e9;
  color: #2e7d32;
}

/* 选中状态 */
.win.selected {
  background-color: #c62828;
  color: white;
}

.draw.selected {
  background-color: #EC6841; /* 参考提供的样式 */
  color: white;
}

.lose.selected {
  background-color: #2e7d32;
  color: white;
}


.result-stats {
  background-color: #ecf0f1;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  font-weight: bold;
  color: #c0392b;
}

/* 比赛列表容器 */
.matches-table {
  flex-grow: 1;
  overflow-y: auto; /* 允许比赛列表独立滚动 */
  border: 1px solid #eee;
  border-radius: 4px;
}


.combinations-content {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 10px;
}

.combination-item {
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 200px;
}

.combo-header {
  font-weight: bold;
  margin-bottom: 5px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #ddd;
}

.combo-match {
  display: flex;
  margin-bottom: 3px;
  font-size: 14px;
}

.match-id {
  width: 30px;
  font-weight: bold;
}

.match-teams {
  flex-grow: 1;
  text-align: left;
  margin-left: 5px;
}

.match-selections {
  width: 80px;
  font-weight: bold;
}

.loading, .no-combinations {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-container {
    flex-direction: column;
    max-height: none; /* 小屏幕取消最大高度限制 */
  }
  
  .url-input-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .url-input-group label {
    margin-bottom: 5px;
  }
  
  .url-input {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .info-bar {
    flex-direction: column;
    gap: 5px;
  }
  
  .button-group {
    flex-wrap: wrap;
    justify-content: center;
  }
  .matches-container, .combinations-container {
    max-height: 600px; /* 小屏幕为每个容器设置最大高度 */
  }
}

.export-zip-btn {
  background-color: #1976D2;
}
/* 调整表格列宽度，为3个格子腾出空间 */
.table-header .table-cell:nth-child(5),
.match-row .table-cell:nth-child(5) {
  flex: 3; /* 合并原有的胜平负三列宽度 */
}

/* 移除原来的胜平负单独列样式 */
.table-header .table-cell:nth-child(6),
.match-row .table-cell:nth-child(6),
.table-header .table-cell:nth-child(7),
.match-row .table-cell:nth-child(7) {
  display: none;
}

/* 优化组合展示样式 */
.combo-match {
  display: flex;
  margin-bottom: 5px;
  font-size: 14px;
  padding: 5px;
  border-radius: 3px;
  background-color: #f9f9f9;
}

.match-teams {
  flex-grow: 1;
  text-align: left;
  margin-left: 10px;
  padding: 2px 0;
}

/* 增加响应式调整 */
@media (max-width: 768px) {
  .table-header .table-cell:nth-child(4),
  .match-row .table-cell:nth-child(4) {
    flex: 2;
  }

  /* 小屏幕隐藏联赛列，优先显示队伍信息 */
  .table-header .table-cell:nth-child(2),
  .match-row .table-cell:nth-child(2) {
    display: none;
  }
}
/* 新增随机按钮样式 */
.random-btn {
  background-color: #7B1FA2;
  color: white;
  margin: 0 3px;
}

.random-btn:hover {
  background-color: #6A1B9A;
}

/* 期号输入框样式调整 */
.url-input-group {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 期号下拉框样式 */
.draw-num-select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* 加载期号按钮样式 */
.apply-url-btn {
  background-color: #4CAF50; /* 修改为绿色 */
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.apply-url-btn:hover {
  background-color: #45a049;
}
/* 期号输入区域样式 */
.draw-num-input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  flex-grow: 1;
}

.manual-draw-checkbox {
  margin: 0 5px;
}



.tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-bottom: 3px solid transparent;
}

.tab-btn.active {
  border-bottom-color: #3498db;
  color: #3498db;
  font-weight: bold;
}

.tab-btn:hover {
  background-color: #f5f5f5;
}

.tab-content {
  height: calc(100vh - 120px);
  overflow: hidden;
}


/* Tab导航样式 */
.tab-navigation {
  display: flex;
  margin: 20px 0;
  border-bottom: 1px solid #ddd;
}

.tab-button {
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-bottom: 3px solid transparent;
  margin-right: 5px;
}

.tab-button.active {
  border-bottom-color: #2196F3;
  color: #2196F3;
  font-weight: bold;
}

.tab-button:hover:not(.active) {
  background-color: #f5f5f5;
  border-bottom-color: #eee;
}

/* 导出进度样式 */
.export-progress {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  width: 300px;
}

.progress-bar {
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: #2196F3;
  transition: width 0.3s ease;
}